<div class="r0 p20 pt10 col-xs-12" ng-controller="interfaceDetailCtrl">
    <div class="col-xs-12 p0 f12 lh26">
        <div class="fb f20 pb10 C555 mt10">
            <div class="fl m0">Url：{{model.fullUrl}}</div>
            <div class="fr m0">
                版本号：
                <a href="javascript:void(0)" class="f12 btn btn-purple btn-xs"><i class="iconfont">&#xe625;&nbsp;</i>{{model.version}}</a>
                <a ng-href="#/{{model.projectId}}/front/interface/debug/{{version.id}}"
                   class="f12 btn btn-default btn-xs" ng-repeat="version in versions">
                    <i class="iconfont">&#xe625;&nbsp;</i>{{version.version}}
                </a>
                <a ng-href="#/{{model.projectId}}/front/interfaceDetail/{{model.id}}"
                   class="f12 btn btn-default btn-xs">
                    <i class="iconfont">&#xe614;&nbsp;</i>接口
                </a>
            </div>
            <div class="cb"></div>
        </div>
        <div class="f14 mt10 mb20 b1 bl-5 r3 p10 no-right-radius BCEEE">
            接口：{{model.interfaceName}}
            <br>
            说明：<span ng-bind-html="model.remark|trustHtml"></span>
        </div>


        <form ng-submit="getDebugResult()">
            <table class="table table-bordered table-hover">
                <tr>
                    <td>url</td>
                    <td>
                        <input type="text" class="form-control" ng-model="model.fullUrl" required
                               placeholder="示例：http://api.crap.cn/CustomerOrder/{id}">
                    </td>
                </tr>
                <tr>
                    <td>请求方式</td>
                    <td>
                        <input class="form-control cursor" type="text" id="debugMethod" placeholder="请点击输入框选择" required
                               ng-model="model.debugMethod"
                               ng-focus="loadPickByName('iwidth=220|iheight=250|showType=5|tag=debugMethod|code=REQUESTMETHOD|def='+model.debugMethod,$event)">
                    </td>
                </tr>
                <tr ng-if="headers!=null&& headers.length>0">
                    <td>请求头</td>
                    <td>
                        <table class="table tableInupt" id="debugHeader">
                            <thead>
                            <tr class="BGEEE C000">
                                <th class="tc w200">名称</th>
                                <th class="tc">值</th>
                                <th class="tc">类型</th>

                                <th class="tc w150">备注</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="lh20" ng-repeat="item in headers">
                                <td class="tc fb C000">{{item.name}}</td>
                                <td class="tc C000 w250">
                                    <input class="form-control btn-xs dis-in-tab w200 fl" type="text"
                                           name="{{item.name}}" value="{{item.def}}">
                                    <span ng-if="item.necessary=='true'" class="w50 fb text-danger">*</span>
                                </td>
                                <td class="tc C000">{{item.type}}</td>

                                <td class="tc C000">{{item.remark}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr ng-if="formParams!=null && formParams.length>0">
                    <td>请求参数</td>
                    <td>
                        <table class="table tableInupt" id="debugParams">
                            <thead>
                            <tr class="BGEEE C000">
                                <th class="tc w200">名称</th>
                                <th class="tc">值</th>
                                <th class="tc">类型</th>

                                <th class="tc w150">备注</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="lh20" ng-repeat="item in formParams">
                                <td class="tc fb C000">{{item.name}}</td>
                                <td class="tc C000 w250">
                                    <input class="form-control btn-xs dis-in-tab w200 fl" type="text"
                                           name="{{item.name}}" value="{{item.def}}">
                                    <span ng-if="item.necessary=='true'" class="w50 fb text-danger">*</span>
                                </td>
                                <td class="tc C000">{{item.type}}</td>

                                <td class="tc C000">{{item.remark}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr ng-if="model.customParams">
                    <td>请求参数</td>
                    <td>
                        <textarea class="form-control no-resize" ng-model="model.customParams" rows="6"
                                  placeholder="自定义参数"></textarea>
                    </td>
                </tr>

                <tr>
                    <td colspan="2">
                        <button type="submit" class="btn btn-success fr ml10">调试</button>
                    </td>
                </tr>
            </table>

        </form>
        <div class="code" ng-if="model.debugResult">
            <pre>{{model.debugResult}}</pre>
        </div>


    </div>
</div>
<div class="cb"></div>

